import request from '@/utils/request'
import {pageCusMessage} from "@/api/system/customermessage";


/**
 * 分页查询
 * @param query
 * @returns {AxiosPromise}
 */
export function pageList(data) {
  return request({
    url: '/api/product/page', method: 'post', data: data
  })
}


/**
 * 详情接口
 * @param query
 * @returns {AxiosPromise}
 */
export function detail(data) {
  return request({
    url: '/api/product/detail', method: 'post', data: data
  })
}


/**
 * 添加
 * @param query
 * @returns {AxiosPromise}
 */
export function save(data) {
  return request({
    url: '/api/product/add', method: 'post', data: data
  })
}

/**
 * 根据类型获取列表
 * @param query
 * @returns {AxiosPromise}
 */
export function getProductTypeList() {
  return request({
    url: '/api/product_type/list', method: 'get'
  })
}


/**
 * 删除轮播
 * @param query
 * @returns {AxiosPromise}
 */
export function deleteData(data) {
  return request({
    url: '/api/product/delete', method: 'post', data: data
  })
}


/**
 * 更新
 * @param query
 * @returns {AxiosPromise}
 */
export function update(data) {
  return request({
    url: '/api/product/update', method: 'post', data: data
  })
}

